package slicktemplate;

/**
 *
 * @author Sunset OGPC 2012
 */
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class Game extends StateBasedGame {

    static int height = 768;
    static int width = 1024;
    static boolean fullscreen = true;
    static boolean showFPS = false;
    static String title = "IZ GAME!!!";
    static int fpslimit = 60;
    static final int MENU_STATE = 1;
    static final int LEVEL1_STATE = 2;
    static final int LEVELEDIT_STATE = -1;
    static final int SPLASHSCREEN_STATE = 3;
    static final int LOSE_STATE = 4;
    static int money = 1000;
    public Game(String title) {
        super(title);
        this.addState(new Menu(MENU_STATE)); //tell its that the menu exists
        this.addState(new Level1(LEVEL1_STATE));// init the LEVEL1 state
        this.addState(new LevelEditor(LEVELEDIT_STATE));
        this.addState(new LevelSplashScreen(SPLASHSCREEN_STATE));
        this.addState(new LevelLose(LOSE_STATE));
        this.enterState(SPLASHSCREEN_STATE); //start with the menu
    }

    public static void main(String[] args) throws SlickException {
        AppGameContainer app = new AppGameContainer(new Game(title)); //not exactly sure what this is. Obviously this creates a new AppGameContainer
        app.setDisplayMode(width, height, fullscreen);
        app.setSmoothDeltas(true);
        app.setTargetFrameRate(fpslimit);
        app.setShowFPS(showFPS);
        app.start(); //start the game now that you've set the parameters
    }

    @Override
    public void initStatesList(GameContainer container) throws SlickException {
    }

}
